package com.ruoyi.project.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.mapper.A07TrainingMapper;
import com.ruoyi.project.domain.A07Training;
import com.ruoyi.project.service.IA07TrainingService;

/**
 * 培训项目Service业务层处理
 * 
 * @author WorrilessGo
 * @date 2025-11-19
 */
@Service
public class A07TrainingServiceImpl implements IA07TrainingService 
{
    @Autowired
    private A07TrainingMapper a07TrainingMapper;

    /**
     * 查询培训项目
     * 
     * @param id 培训项目主键
     * @return 培训项目
     */
    @Override
    public A07Training selectA07TrainingById(Long id)
    {
        return a07TrainingMapper.selectA07TrainingById(id);
    }

    /**
     * 查询培训项目列表
     * 
     * @param a07Training 培训项目
     * @return 培训项目
     */
    @Override
    public List<A07Training> selectA07TrainingList(A07Training a07Training)
    {
        return a07TrainingMapper.selectA07TrainingList(a07Training);
    }

    /**
     * 新增培训项目
     * 
     * @param a07Training 培训项目
     * @return 结果
     */
    @Override
    public int insertA07Training(A07Training a07Training)
    {
        a07Training.setCreateTime(DateUtils.getNowDate());
        return a07TrainingMapper.insertA07Training(a07Training);
    }

    /**
     * 修改培训项目
     * 
     * @param a07Training 培训项目
     * @return 结果
     */
    @Override
    public int updateA07Training(A07Training a07Training)
    {
        a07Training.setUpdateTime(DateUtils.getNowDate());
        return a07TrainingMapper.updateA07Training(a07Training);
    }

    /**
     * 批量删除培训项目
     * 
     * @param ids 需要删除的培训项目主键
     * @return 结果
     */
    @Override
    public int deleteA07TrainingByIds(Long[] ids)
    {
        return a07TrainingMapper.deleteA07TrainingByIds(ids);
    }

    /**
     * 删除培训项目信息
     * 
     * @param id 培训项目主键
     * @return 结果
     */
    @Override
    public int deleteA07TrainingById(Long id)
    {
        return a07TrainingMapper.deleteA07TrainingById(id);
    }
}
